"""
    a,b,c 三个数 ，满足 a+b+c = 1000, 切 a^2 + b^2 = c^2

"""
import time
start_time = time.time()

for i in range(1000):
    for j in range(1000):
        for k in range(1000):
            if(i + j + k == 1000 and  i**2 + j**2 == k**2 ):
                print(f"i = {i},j = {j},k = {k}")

end_time = time.time()

print(f"消耗时间是：{end_time - start_time}")

start_time = time.time()
for a in range(1000):
    for b in range(1000):
        c = 1000 - a - b
        if(a**2 + b**2 == c**2):
            print(f"a = {a}, b = {b},c = {c}")
end_time = time.time()
print(f"v2-消耗时间是：{end_time - start_time}")

